package com.bmp.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.bmp.dao.CasesDao;
import com.bmp.model.Cases;
import com.bmp.model.vo.CaseVoProjectUser;
import com.bmp.service.CasesManager;

@Component("casesManager")
public class CasesManagerImpl implements CasesManager {
	private CasesDao casesDao;

	public CasesDao getCasesDao() {
		return casesDao;
	}

	@Resource
	public void setCasesDao(CasesDao casesDao) {
		this.casesDao = casesDao;
	}

	public void addCases(Cases c) {
		this.casesDao.insertCases(c);
	}

	public void deleteCasesById(int id) {
		this.casesDao.deleteCasesById(id);
	}

	public Cases getCasesById(int id) {
		return this.casesDao.getCasesById(id);
	}

	public void updateCases(Cases c) {
		this.casesDao.updateCases(c);
	}

	public List<CaseVoProjectUser> getCases(int page, int rows) {
		return this.casesDao.getCases(page, rows);
	}

	public int getTotalPages() {
		return this.casesDao.getTotalPages();
	}

}
